<?php if (count($projects)): ?>
<div id="sf_admin_projects">
  Текущий проект: 
  <?php foreach ($projects as $i=>$project): ?>
    <a href="<?php echo url_for('@change_project?id='.$project->id) ?>" <?php if ($project->id==$sf_user->getGuardUser()->Profile->CurrentProject->id) echo 'class="current"' ?>><?php  echo $project->name ?></a>
    <?php if ($i<count($projects)-1): ?>
      &nbsp;&nbsp;|&nbsp;&nbsp;
    <?php endif ?>
  <?php endforeach ?>
</div>
<?php endif ?>